<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>esapi.test.test_http_utilities</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="esapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="esapi-module.html">Package&nbsp;esapi</a> ::
        <a href="esapi.test-module.html">Package&nbsp;test</a> ::
        Module&nbsp;test_http_utilities
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="esapi.test.test_http_utilities-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="esapi.test.test_http_utilities-module.html">Module esapi.test.test_http_utilities</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">@license: OWASP Enterprise Security API (ESAPI)</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">     </tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">    This file is part of the Open Web Application Security Project (OWASP)</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">    Enterprise Security API (ESAPI) project. For details, please see</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">    U{http://www.owasp.org/index.php/ESAPI&lt;http://www.owasp.org/index.php/ESAPI&gt;}.</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">    The ESAPI is published by OWASP under the BSD license. You should read and </tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">    accept the LICENSE before you use, modify, and/or redistribute this software.</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-docstring">@summary: Test suite for the Logger interface.</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">@copyright: Copyright (c) 2009 - The OWASP Foundation</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring">@author: Craig Younkins (craig.younkins@owasp.org)</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-comment"># Use esapi/test/conf instead of esapi/conf</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-comment"># It is important that this is at the top, as it affects the imports below</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-comment"># by loading the test configuration instead of the normal one.</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-comment"># This should ONLY ever be used in the unit tests.</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Package esapi=esapi-module.html"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-0', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Package esapi.test=esapi.test-module.html"><a title="esapi.test" class="py-name" href="#" onclick="return doclink('link-1', 'test', 'link-1');">test</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Package esapi.conf=esapi.conf-module.html,Package esapi.test.conf=esapi.test.conf-module.html"><a title="esapi.conf
esapi.test.conf" class="py-name" href="#" onclick="return doclink('link-2', 'conf', 'link-2');">conf</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">unittest</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Cookie</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Morsel</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-3', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module esapi.core=esapi.core-module.html"><a title="esapi.core" class="py-name" href="#" onclick="return doclink('link-4', 'core', 'link-4');">core</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class esapi.core.ESAPI=esapi.core.ESAPI-class.html"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-5', 'ESAPI', 'link-5');">ESAPI</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-6', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Class Method esapi.core.ESAPI.http_utilities()=esapi.core.ESAPI-class.html#http_utilities,Module esapi.http_utilities=esapi.http_utilities-module.html"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-7', 'http_utilities', 'link-7');">http_utilities</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Class esapi.http_utilities.HTTPUtilities=esapi.http_utilities.HTTPUtilities-class.html"><a title="esapi.http_utilities.HTTPUtilities" class="py-name" href="#" onclick="return doclink('link-8', 'HTTPUtilities', 'link-8');">HTTPUtilities</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-9', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="esapi.test" class="py-name" href="#" onclick="return doclink('link-10', 'test', 'link-1');">test</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Package esapi.test.http=esapi.test.http-module.html"><a title="esapi.test.http" class="py-name" href="#" onclick="return doclink('link-11', 'http', 'link-11');">http</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Module esapi.test.http.mock_http_request=esapi.test.http.mock_http_request-module.html"><a title="esapi.test.http.mock_http_request" class="py-name" href="#" onclick="return doclink('link-12', 'mock_http_request', 'link-12');">mock_http_request</a></tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Class esapi.test.http.mock_http_request.MockHttpRequest=esapi.test.http.mock_http_request.MockHttpRequest-class.html"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-13', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-14" class="py-name"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-14', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="esapi.test" class="py-name" href="#" onclick="return doclink('link-15', 'test', 'link-1');">test</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="esapi.test.http" class="py-name" href="#" onclick="return doclink('link-16', 'http', 'link-11');">http</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Module esapi.test.http.mock_http_response=esapi.test.http.mock_http_response-module.html"><a title="esapi.test.http.mock_http_response" class="py-name" href="#" onclick="return doclink('link-17', 'mock_http_response', 'link-17');">mock_http_response</a></tt> <tt class="py-keyword">import</tt> <tt id="link-18" class="py-name" targets="Class esapi.test.http.mock_http_response.MockHttpResponse=esapi.test.http.mock_http_response.MockHttpResponse-class.html"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-18', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-19" class="py-name"><a title="esapi" class="py-name" href="#" onclick="return doclink('link-19', 'esapi', 'link-0');">esapi</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="esapi.test" class="py-name" href="#" onclick="return doclink('link-20', 'test', 'link-1');">test</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="esapi.test.http" class="py-name" href="#" onclick="return doclink('link-21', 'http', 'link-11');">http</a></tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Module esapi.test.http.mock_session=esapi.test.http.mock_session-module.html"><a title="esapi.test.http.mock_session" class="py-name" href="#" onclick="return doclink('link-22', 'mock_session', 'link-22');">mock_session</a></tt> <tt class="py-keyword">import</tt> <tt id="link-23" class="py-name" targets="Class esapi.test.http.mock_session.MockSession=esapi.test.http.mock_session.MockSession-class.html"><a title="esapi.test.http.mock_session.MockSession" class="py-name" href="#" onclick="return doclink('link-23', 'MockSession', 'link-23');">MockSession</a></tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="HTTPUtilitiesTest"></a><div id="HTTPUtilitiesTest-def"><a name="L36"></a><tt class="py-lineno"> 36</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest-toggle" onclick="return toggle('HTTPUtilitiesTest');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html">HTTPUtilitiesTest</a><tt class="py-op">(</tt><tt class="py-base-class">unittest</tt><tt class="py-op">.</tt><tt class="py-base-class">TestCase</tt><tt class="py-op">)</tt><tt class="py-op">:</tt>  </tt>
</div><a name="HTTPUtilitiesTest.__init__"></a><div id="HTTPUtilitiesTest.__init__-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.__init__-toggle" onclick="return toggle('HTTPUtilitiesTest.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">test_name</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.__init__-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">        Instantiates a new HTTPUtilities test.</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">        @param test_name: the test name</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">TestCase</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Method esapi.access_reference_map.AccessReferenceMap.__init__()=esapi.access_reference_map.AccessReferenceMap-class.html#__init__,Method esapi.authenticator.Authenticator.__init__()=esapi.authenticator.Authenticator-class.html#__init__,Method esapi.codecs.codec.Codec.__init__()=esapi.codecs.codec.Codec-class.html#__init__,Method esapi.codecs.css.CSSCodec.__init__()=esapi.codecs.css.CSSCodec-class.html#__init__,Method esapi.codecs.html_entity.HTMLEntityCodec.__init__()=esapi.codecs.html_entity.HTMLEntityCodec-class.html#__init__,Method esapi.codecs.javascript.JavascriptCodec.__init__()=esapi.codecs.javascript.JavascriptCodec-class.html#__init__,Method esapi.codecs.ldap.LDAPCodec.__init__()=esapi.codecs.ldap.LDAPCodec-class.html#__init__,Method esapi.codecs.ldap_dn.LDAPDNCodec.__init__()=esapi.codecs.ldap_dn.LDAPDNCodec-class.html#__init__,Method esapi.codecs.mysql.MySQLCodec.__init__()=esapi.codecs.mysql.MySQLCodec-class.html#__init__,Method esapi.codecs.oracle.OracleCodec.__init__()=esapi.codecs.oracle.OracleCodec-class.html#__init__,Method esapi.codecs.percent.PercentCodec.__init__()=esapi.codecs.percent.PercentCodec-class.html#__init__,Method esapi.codecs.push_back_string.PushbackString.__init__()=esapi.codecs.push_back_string.PushbackString-class.html#__init__,Method esapi.codecs.unix.UnixCodec.__init__()=esapi.codecs.unix.UnixCodec-class.html#__init__,Method esapi.codecs.vbscript.VBScriptCodec.__init__()=esapi.codecs.vbscript.VBScriptCodec-class.html#__init__,Method esapi.codecs.windows.WindowsCodec.__init__()=esapi.codecs.windows.WindowsCodec-class.html#__init__,Method esapi.encoder.Encoder.__init__()=esapi.encoder.Encoder-class.html#__init__,Method esapi.encryptor.Encryptor.__init__()=esapi.encryptor.Encryptor-class.html#__init__,Method esapi.exceptions.AccessControlException.__init__()=esapi.exceptions.AccessControlException-class.html#__init__,Method esapi.exceptions.AuthenticationAccountsException.__init__()=esapi.exceptions.AuthenticationAccountsException-class.html#__init__,Method esapi.exceptions.AuthenticationCredentialsException.__init__()=esapi.exceptions.AuthenticationCredentialsException-class.html#__init__,Method esapi.exceptions.AuthenticationException.__init__()=esapi.exceptions.AuthenticationException-class.html#__init__,Method esapi.exceptions.AuthenticationHostException.__init__()=esapi.exceptions.AuthenticationHostException-class.html#__init__,Method esapi.exceptions.AuthenticationLoginException.__init__()=esapi.exceptions.AuthenticationLoginException-class.html#__init__,Method esapi.exceptions.AvailabilityException.__init__()=esapi.exceptions.AvailabilityException-class.html#__init__,Method esapi.exceptions.CertificateException.__init__()=esapi.exceptions.CertificateException-class.html#__init__,Method esapi.exceptions.ConfigurationException.__init__()=esapi.exceptions.ConfigurationException-class.html#__init__,Method esapi.exceptions.EncodingException.__init__()=esapi.exceptions.EncodingException-class.html#__init__,Method esapi.exceptions.EncryptionException.__init__()=esapi.exceptions.EncryptionException-class.html#__init__,Method esapi.exceptions.EnterpriseSecurityException.__init__()=esapi.exceptions.EnterpriseSecurityException-class.html#__init__,Method esapi.exceptions.ExecutorException.__init__()=esapi.exceptions.ExecutorException-class.html#__init__,Method esapi.exceptions.IntegrityException.__init__()=esapi.exceptions.IntegrityException-class.html#__init__,Method esapi.exceptions.IntrusionException.__init__()=esapi.exceptions.IntrusionException-class.html#__init__,Method esapi.exceptions.ValidationAvailabilityException.__init__()=esapi.exceptions.ValidationAvailabilityException-class.html#__init__,Method esapi.exceptions.ValidationException.__init__()=esapi.exceptions.ValidationException-class.html#__init__,Method esapi.exceptions.ValidationUploadException.__init__()=esapi.exceptions.ValidationUploadException-class.html#__init__,Method esapi.executor.Executor.__init__()=esapi.executor.Executor-class.html#__init__,Method esapi.http_utilities.HTTPUtilities.__init__()=esapi.http_utilities.HTTPUtilities-class.html#__init__,Method esapi.ihttp.IHttpRequest.__init__()=esapi.ihttp.IHttpRequest-class.html#__init__,Method esapi.ihttp.IHttpResponse.__init__()=esapi.ihttp.IHttpResponse-class.html#__init__,Method esapi.ihttp.ISession.__init__()=esapi.ihttp.ISession-class.html#__init__,Method esapi.log_factory.LogFactory.__init__()=esapi.log_factory.LogFactory-class.html#__init__,Method esapi.logger.Logger.EventType.__init__()=esapi.logger.Logger.EventType-class.html#__init__,Method esapi.logger.Logger.__init__()=esapi.logger.Logger-class.html#__init__,Method esapi.randomizer.Randomizer.__init__()=esapi.randomizer.Randomizer-class.html#__init__,Method esapi.reference.default_encoder.DefaultEncoder.__init__()=esapi.reference.default_encoder.DefaultEncoder-class.html#__init__,Method esapi.reference.default_encryptor.DefaultEncryptor.__init__()=esapi.reference.default_encryptor.DefaultEncryptor-class.html#__init__,Method esapi.reference.default_executor.DefaultExecutor.__init__()=esapi.reference.default_executor.DefaultExecutor-class.html#__init__,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.__init__()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#__init__,Method esapi.reference.default_intrusion_detector.DefaultIntrusionDetector.Event.__init__()=esapi.reference.default_intrusion_detector.DefaultIntrusionDetector.Event-class.html#__init__,Method esapi.reference.default_intrusion_detector.DefaultIntrusionDetector.__init__()=esapi.reference.default_intrusion_detector.DefaultIntrusionDetector-class.html#__init__,Method esapi.reference.default_randomizer.DefaultRandomizer.__init__()=esapi.reference.default_randomizer.DefaultRandomizer-class.html#__init__,Method esapi.reference.default_security_configuration.DefaultSecurityConfiguration.__init__()=esapi.reference.default_security_configuration.DefaultSecurityConfiguration-class.html#__init__,Method esapi.reference.default_user.DefaultUser.__init__()=esapi.reference.default_user.DefaultUser-class.html#__init__,Method esapi.reference.default_validator.DefaultValidator.__init__()=esapi.reference.default_validator.DefaultValidator-class.html#__init__,Method esapi.reference.file_based_access_controller.FileBasedAccessController.__init__()=esapi.reference.file_based_access_controller.FileBasedAccessController-class.html#__init__,Method esapi.reference.file_based_access_controller.Rule.__init__()=esapi.reference.file_based_access_controller.Rule-class.html#__init__,Method esapi.reference.python_log_factory.PythonLogFactory.PythonLogger.__init__()=esapi.reference.python_log_factory.PythonLogFactory.PythonLogger-class.html#__init__,Method esapi.reference.python_log_factory.PythonLogFactory.__init__()=esapi.reference.python_log_factory.PythonLogFactory-class.html#__init__,Method esapi.reference.random_access_reference_map.RandomAccessReferenceMap.__init__()=esapi.reference.random_access_reference_map.RandomAccessReferenceMap-class.html#__init__,Method esapi.reference.shelve_authenticator.ShelveAuthenticator.__init__()=esapi.reference.shelve_authenticator.ShelveAuthenticator-class.html#__init__,Method esapi.reference.user_credentials.UserCredentials.__init__()=esapi.reference.user_credentials.UserCredentials-class.html#__init__,Method esapi.reference.validation.base_validation_rule.BaseValidationRule.__init__()=esapi.reference.validation.base_validation_rule.BaseValidationRule-class.html#__init__,Method esapi.reference.validation.credit_card_validation_rule.CreditCardValidationRule.__init__()=esapi.reference.validation.credit_card_validation_rule.CreditCardValidationRule-class.html#__init__,Method esapi.reference.validation.date_validation_rule.DateValidationRule.__init__()=esapi.reference.validation.date_validation_rule.DateValidationRule-class.html#__init__,Method esapi.reference.validation.number_validation_rule.NumberValidationRule.__init__()=esapi.reference.validation.number_validation_rule.NumberValidationRule-class.html#__init__,Method esapi.reference.validation.string_validation_rule.StringValidationRule.__init__()=esapi.reference.validation.string_validation_rule.StringValidationRule-class.html#__init__,Method esapi.security_configuration.SecurityConfiguration.Threshold.__init__()=esapi.security_configuration.SecurityConfiguration.Threshold-class.html#__init__,Method esapi.security_configuration.SecurityConfiguration.__init__()=esapi.security_configuration.SecurityConfiguration-class.html#__init__,Method esapi.test.http.mock_http_request.MockHttpRequest.__init__()=esapi.test.http.mock_http_request.MockHttpRequest-class.html#__init__,Method esapi.test.http.mock_http_response.MockHttpResponse.__init__()=esapi.test.http.mock_http_response.MockHttpResponse-class.html#__init__,Method esapi.test.http.mock_session.MockSession.__init__()=esapi.test.http.mock_session.MockSession-class.html#__init__,Method esapi.test.test_access_controller.AccessControllerTest.__init__()=esapi.test.test_access_controller.AccessControllerTest-class.html#__init__,Method esapi.test.test_authenticator.ValidatorTest.__init__()=esapi.test.test_authenticator.ValidatorTest-class.html#__init__,Method esapi.test.test_encoder.EncoderTest.__init__()=esapi.test.test_encoder.EncoderTest-class.html#__init__,Method esapi.test.test_encryptor.EncryptorTest.__init__()=esapi.test.test_encryptor.EncryptorTest-class.html#__init__,Method esapi.test.test_executor.ExecutorTest.__init__()=esapi.test.test_executor.ExecutorTest-class.html#__init__,Method esapi.test.test_http_utilities.HTTPUtilitiesTest.__init__()=esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#__init__,Method esapi.test.test_intrusion_detector.IntrusionDetectorTest.__init__()=esapi.test.test_intrusion_detector.IntrusionDetectorTest-class.html#__init__,Method esapi.test.test_logger.LoggerTest.__init__()=esapi.test.test_logger.LoggerTest-class.html#__init__,Method esapi.test.test_random_access_map.ARMTest.__init__()=esapi.test.test_random_access_map.ARMTest-class.html#__init__,Method esapi.test.test_randomizer.RandomizerTest.__init__()=esapi.test.test_randomizer.RandomizerTest-class.html#__init__,Method esapi.test.test_user.UserTest.__init__()=esapi.test.test_user.UserTest-class.html#__init__,Method esapi.test.test_validator.ValidatorTest.__init__()=esapi.test.test_validator.ValidatorTest-class.html#__init__,Method esapi.user.AnonymousUser.__init__()=esapi.user.AnonymousUser-class.html#__init__,Method esapi.user.User.__init__()=esapi.user.User-class.html#__init__,Method esapi.validator.Validator.__init__()=esapi.validator.Validator-class.html#__init__"><a title="esapi.access_reference_map.AccessReferenceMap.__init__
esapi.authenticator.Authenticator.__init__
esapi.codecs.codec.Codec.__init__
esapi.codecs.css.CSSCodec.__init__
esapi.codecs.html_entity.HTMLEntityCodec.__init__
esapi.codecs.javascript.JavascriptCodec.__init__
esapi.codecs.ldap.LDAPCodec.__init__
esapi.codecs.ldap_dn.LDAPDNCodec.__init__
esapi.codecs.mysql.MySQLCodec.__init__
esapi.codecs.oracle.OracleCodec.__init__
esapi.codecs.percent.PercentCodec.__init__
esapi.codecs.push_back_string.PushbackString.__init__
esapi.codecs.unix.UnixCodec.__init__
esapi.codecs.vbscript.VBScriptCodec.__init__
esapi.codecs.windows.WindowsCodec.__init__
esapi.encoder.Encoder.__init__
esapi.encryptor.Encryptor.__init__
esapi.exceptions.AccessControlException.__init__
esapi.exceptions.AuthenticationAccountsException.__init__
esapi.exceptions.AuthenticationCredentialsException.__init__
esapi.exceptions.AuthenticationException.__init__
esapi.exceptions.AuthenticationHostException.__init__
esapi.exceptions.AuthenticationLoginException.__init__
esapi.exceptions.AvailabilityException.__init__
esapi.exceptions.CertificateException.__init__
esapi.exceptions.ConfigurationException.__init__
esapi.exceptions.EncodingException.__init__
esapi.exceptions.EncryptionException.__init__
esapi.exceptions.EnterpriseSecurityException.__init__
esapi.exceptions.ExecutorException.__init__
esapi.exceptions.IntegrityException.__init__
esapi.exceptions.IntrusionException.__init__
esapi.exceptions.ValidationAvailabilityException.__init__
esapi.exceptions.ValidationException.__init__
esapi.exceptions.ValidationUploadException.__init__
esapi.executor.Executor.__init__
esapi.http_utilities.HTTPUtilities.__init__
esapi.ihttp.IHttpRequest.__init__
esapi.ihttp.IHttpResponse.__init__
esapi.ihttp.ISession.__init__
esapi.log_factory.LogFactory.__init__
esapi.logger.Logger.EventType.__init__
esapi.logger.Logger.__init__
esapi.randomizer.Randomizer.__init__
esapi.reference.default_encoder.DefaultEncoder.__init__
esapi.reference.default_encryptor.DefaultEncryptor.__init__
esapi.reference.default_executor.DefaultExecutor.__init__
esapi.reference.default_http_utilities.DefaultHTTPUtilities.__init__
esapi.reference.default_intrusion_detector.DefaultIntrusionDetector.Event.__init__
esapi.reference.default_intrusion_detector.DefaultIntrusionDetector.__init__
esapi.reference.default_randomizer.DefaultRandomizer.__init__
esapi.reference.default_security_configuration.DefaultSecurityConfiguration.__init__
esapi.reference.default_user.DefaultUser.__init__
esapi.reference.default_validator.DefaultValidator.__init__
esapi.reference.file_based_access_controller.FileBasedAccessController.__init__
esapi.reference.file_based_access_controller.Rule.__init__
esapi.reference.python_log_factory.PythonLogFactory.PythonLogger.__init__
esapi.reference.python_log_factory.PythonLogFactory.__init__
esapi.reference.random_access_reference_map.RandomAccessReferenceMap.__init__
esapi.reference.shelve_authenticator.ShelveAuthenticator.__init__
esapi.reference.user_credentials.UserCredentials.__init__
esapi.reference.validation.base_validation_rule.BaseValidationRule.__init__
esapi.reference.validation.credit_card_validation_rule.CreditCardValidationRule.__init__
esapi.reference.validation.date_validation_rule.DateValidationRule.__init__
esapi.reference.validation.number_validation_rule.NumberValidationRule.__init__
esapi.reference.validation.string_validation_rule.StringValidationRule.__init__
esapi.security_configuration.SecurityConfiguration.Threshold.__init__
esapi.security_configuration.SecurityConfiguration.__init__
esapi.test.http.mock_http_request.MockHttpRequest.__init__
esapi.test.http.mock_http_response.MockHttpResponse.__init__
esapi.test.http.mock_session.MockSession.__init__
esapi.test.test_access_controller.AccessControllerTest.__init__
esapi.test.test_authenticator.ValidatorTest.__init__
esapi.test.test_encoder.EncoderTest.__init__
esapi.test.test_encryptor.EncryptorTest.__init__
esapi.test.test_executor.ExecutorTest.__init__
esapi.test.test_http_utilities.HTTPUtilitiesTest.__init__
esapi.test.test_intrusion_detector.IntrusionDetectorTest.__init__
esapi.test.test_logger.LoggerTest.__init__
esapi.test.test_random_access_map.ARMTest.__init__
esapi.test.test_randomizer.RandomizerTest.__init__
esapi.test.test_user.UserTest.__init__
esapi.test.test_validator.ValidatorTest.__init__
esapi.user.AnonymousUser.__init__
esapi.user.User.__init__
esapi.validator.Validator.__init__" class="py-name" href="#" onclick="return doclink('link-24', '__init__', 'link-24');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">test_name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.setUp"></a><div id="HTTPUtilitiesTest.setUp-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.setUp-toggle" onclick="return toggle('HTTPUtilitiesTest.setUp');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#setUp">setUp</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.setUp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.setUp-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt id="link-25" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-25', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Module esapi.authenticator=esapi.authenticator-module.html,Class Method esapi.core.ESAPI.authenticator()=esapi.core.ESAPI-class.html#authenticator"><a title="esapi.authenticator
esapi.core.ESAPI.authenticator" class="py-name" href="#" onclick="return doclink('link-26', 'authenticator', 'link-26');">authenticator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method esapi.reference.shelve_authenticator.ShelveAuthenticator.clear_all_data()=esapi.reference.shelve_authenticator.ShelveAuthenticator-class.html#clear_all_data"><a title="esapi.reference.shelve_authenticator.ShelveAuthenticator.clear_all_data" class="py-name" href="#" onclick="return doclink('link-27', 'clear_all_data', 'link-27');">clear_all_data</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">     </tt>
<a name="HTTPUtilitiesTest.test_csrf_token"></a><div id="HTTPUtilitiesTest.test_csrf_token-def"><a name="L48"></a><tt class="py-lineno"> 48</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_csrf_token-toggle" onclick="return toggle('HTTPUtilitiesTest.test_csrf_token');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_csrf_token">test_csrf_token</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_csrf_token-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_csrf_token-expanded"><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">"testCSRFUser"</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-string">"addCSRFToken"</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt id="link-28" class="py-name" targets="Class Method esapi.core.ESAPI.user()=esapi.core.ESAPI-class.html#user,Module esapi.user=esapi.user-module.html"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-28', 'user', 'link-28');">user</a></tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-29', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="esapi.authenticator
esapi.core.ESAPI.authenticator" class="py-name" href="#" onclick="return doclink('link-30', 'authenticator', 'link-26');">authenticator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method esapi.authenticator.Authenticator.create_user()=esapi.authenticator.Authenticator-class.html#create_user,Method esapi.reference.shelve_authenticator.ShelveAuthenticator.create_user()=esapi.reference.shelve_authenticator.ShelveAuthenticator-class.html#create_user"><a title="esapi.authenticator.Authenticator.create_user
esapi.reference.shelve_authenticator.ShelveAuthenticator.create_user" class="py-name" href="#" onclick="return doclink('link-31', 'create_user', 'link-31');">create_user</a></tt><tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt id="link-32" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-32', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="esapi.authenticator
esapi.core.ESAPI.authenticator" class="py-name" href="#" onclick="return doclink('link-33', 'authenticator', 'link-26');">authenticator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">current_user</tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-34', 'user', 'link-28');">user</a></tt>  </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-name">token</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-35', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-36', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.get_csrf_token()=esapi.http_utilities.HTTPUtilities-class.html#get_csrf_token,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.get_csrf_token()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#get_csrf_token"><a title="esapi.http_utilities.HTTPUtilities.get_csrf_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.get_csrf_token" class="py-name" href="#" onclick="return doclink('link-37', 'get_csrf_token', 'link-37');">get_csrf_token</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">token</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-38', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">            <tt id="link-39" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-39', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-40', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.verify_csrf_token()=esapi.http_utilities.HTTPUtilities-class.html#verify_csrf_token,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.verify_csrf_token()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#verify_csrf_token"><a title="esapi.http_utilities.HTTPUtilities.verify_csrf_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.verify_csrf_token" class="py-name" href="#" onclick="return doclink('link-41', 'verify_csrf_token', 'link-41');">verify_csrf_token</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-comment"># expected</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">             </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">GET</tt><tt class="py-op">[</tt><tt id="link-42" class="py-name"><a title="esapi.http_utilities.HTTPUtilities" class="py-name" href="#" onclick="return doclink('link-42', 'HTTPUtilities', 'link-8');">HTTPUtilities</a></tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Variable esapi.http_utilities.HTTPUtilities.CSRF_TOKEN_NAME=esapi.http_utilities.HTTPUtilities-class.html#CSRF_TOKEN_NAME"><a title="esapi.http_utilities.HTTPUtilities.CSRF_TOKEN_NAME" class="py-name" href="#" onclick="return doclink('link-43', 'CSRF_TOKEN_NAME', 'link-43');">CSRF_TOKEN_NAME</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">token</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt id="link-44" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-44', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-45', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.verify_csrf_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.verify_csrf_token" class="py-name" href="#" onclick="return doclink('link-46', 'verify_csrf_token', 'link-41');">verify_csrf_token</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_add_csrf_token"></a><div id="HTTPUtilitiesTest.test_add_csrf_token-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_add_csrf_token-toggle" onclick="return toggle('HTTPUtilitiesTest.test_add_csrf_token');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_add_csrf_token">test_add_csrf_token</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_add_csrf_token-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_add_csrf_token-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-47', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="esapi.authenticator
esapi.core.ESAPI.authenticator" class="py-name" href="#" onclick="return doclink('link-48', 'authenticator', 'link-26');">authenticator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-name">username</tt> <tt class="py-op">=</tt> <tt class="py-string">"addCSRFUser"</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-string">'addCSRFToken'</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt id="link-49" class="py-name"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-49', 'user', 'link-28');">user</a></tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="esapi.authenticator.Authenticator.create_user
esapi.reference.shelve_authenticator.ShelveAuthenticator.create_user" class="py-name" href="#" onclick="return doclink('link-50', 'create_user', 'link-31');">create_user</a></tt><tt class="py-op">(</tt><tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">current_user</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-51', 'user', 'link-28');">user</a></tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">         </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-name">csrf1</tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-52', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-53', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.add_csrf_token()=esapi.http_utilities.HTTPUtilities-class.html#add_csrf_token,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_csrf_token()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#add_csrf_token"><a title="esapi.http_utilities.HTTPUtilities.add_csrf_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_csrf_token" class="py-name" href="#" onclick="return doclink('link-54', 'add_csrf_token', 'link-54');">add_csrf_token</a></tt><tt class="py-op">(</tt><tt class="py-string">'/test1'</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">csrf1</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">         </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">csrf2</tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-55', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-56', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.add_csrf_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_csrf_token" class="py-name" href="#" onclick="return doclink('link-57', 'add_csrf_token', 'link-54');">add_csrf_token</a></tt><tt class="py-op">(</tt><tt class="py-string">'test1?one=two'</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">csrf2</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">'?'</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_add_header"></a><div id="HTTPUtilitiesTest.test_add_header-def"><a name="L79"></a><tt class="py-lineno"> 79</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_add_header-toggle" onclick="return toggle('HTTPUtilitiesTest.test_add_header');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_add_header">test_add_header</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_add_header-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_add_header-expanded"><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-58" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-58', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-59', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-60', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-61" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-61', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.set_current_http()=esapi.http_utilities.HTTPUtilities-class.html#set_current_http,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#set_current_http"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-62', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">         </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.add_header()=esapi.http_utilities.HTTPUtilities-class.html#add_header,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_header()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#add_header"><a title="esapi.http_utilities.HTTPUtilities.add_header
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_header" class="py-name" href="#" onclick="return doclink('link-63', 'add_header', 'link-63');">add_header</a></tt><tt class="py-op">(</tt><tt class="py-string">'HeaderName'</tt><tt class="py-op">,</tt> <tt class="py-string">'HeaderValue'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_assert_secure_request"></a><div id="HTTPUtilitiesTest.test_assert_secure_request-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_assert_secure_request-toggle" onclick="return toggle('HTTPUtilitiesTest.test_assert_secure_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_assert_secure_request">test_assert_secure_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_assert_secure_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_assert_secure_request-expanded"><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-64', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">         </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-name">bad</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'http://example.com'</tt><tt class="py-op">,</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">               <tt class="py-string">'ftp://example.com'</tt><tt class="py-op">,</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">               <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">               <tt class="py-name">None</tt><tt class="py-op">,</tt><tt class="py-op">]</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-name">good</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'https://example.com'</tt><tt class="py-op">]</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">         </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">bad_url</tt> <tt class="py-keyword">in</tt> <tt class="py-name">bad</tt><tt class="py-op">:</tt>  </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">url</tt> <tt class="py-op">=</tt> <tt class="py-name">bad_url</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                <tt id="link-65" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-65', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-66', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.assert_secure_request()=esapi.http_utilities.HTTPUtilities-class.html#assert_secure_request,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.assert_secure_request()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#assert_secure_request"><a title="esapi.http_utilities.HTTPUtilities.assert_secure_request
esapi.reference.default_http_utilities.DefaultHTTPUtilities.assert_secure_request" class="py-name" href="#" onclick="return doclink('link-67', 'assert_secure_request', 'link-67');">assert_secure_request</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">             </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">good_url</tt> <tt class="py-keyword">in</tt> <tt class="py-name">good</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">url</tt> <tt class="py-op">=</tt> <tt class="py-name">good_url</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                <tt id="link-68" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-68', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-69', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.assert_secure_request
esapi.reference.default_http_utilities.DefaultHTTPUtilities.assert_secure_request" class="py-name" href="#" onclick="return doclink('link-70', 'assert_secure_request', 'link-67');">assert_secure_request</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                 </tt>
<a name="HTTPUtilitiesTest.test_change_session_identifier"></a><div id="HTTPUtilitiesTest.test_change_session_identifier-def"><a name="L112"></a><tt class="py-lineno">112</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_change_session_identifier-toggle" onclick="return toggle('HTTPUtilitiesTest.test_change_session_identifier');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_change_session_identifier">test_change_session_identifier</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_change_session_identifier-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_change_session_identifier-expanded"><a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-71', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-72', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt id="link-73" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-73', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-74', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-75', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">session</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">session</tt><tt class="py-op">[</tt><tt class="py-string">'one'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'one'</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-name">session</tt><tt class="py-op">[</tt><tt class="py-string">'two'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'two'</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">        <tt class="py-name">session</tt><tt class="py-op">[</tt><tt class="py-string">'three'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'three'</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-name">id1</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">         </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-name">session</tt> <tt class="py-op">=</tt> <tt id="link-76" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-76', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-77', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.change_session_identifier()=esapi.http_utilities.HTTPUtilities-class.html#change_session_identifier,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.change_session_identifier()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#change_session_identifier"><a title="esapi.http_utilities.HTTPUtilities.change_session_identifier
esapi.reference.default_http_utilities.DefaultHTTPUtilities.change_session_identifier" class="py-name" href="#" onclick="return doclink('link-78', 'change_session_identifier', 'link-78');">change_session_identifier</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-name">id2</tt> <tt class="py-op">=</tt> <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">session</tt><tt class="py-op">.</tt><tt class="py-name">id</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">             </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertFalse</tt><tt class="py-op">(</tt><tt class="py-name">id1</tt> <tt class="py-op">==</tt> <tt class="py-name">id2</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-string">"one"</tt><tt class="py-op">,</tt> <tt class="py-name">session</tt><tt class="py-op">[</tt><tt class="py-string">'one'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_kill_cookie"></a><div id="HTTPUtilitiesTest.test_kill_cookie-def"><a name="L128"></a><tt class="py-lineno">128</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_kill_cookie-toggle" onclick="return toggle('HTTPUtilitiesTest.test_kill_cookie');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_kill_cookie">test_kill_cookie</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_kill_cookie-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_kill_cookie-expanded"><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-79" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-79', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-80', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">         </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">        <tt id="link-81" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-81', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-82', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-83', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">         </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-name">new_cookies</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt class="py-name">Morsel</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">        <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-string">'test1'</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'1'</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-name">new_cookies</tt><tt class="py-op">[</tt><tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">m</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">         </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt class="py-name">Morsel</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt class="py-string">'test2'</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">        <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'2'</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-name">new_cookies</tt><tt class="py-op">[</tt><tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">m</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">         </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt> <tt class="py-op">=</tt> <tt class="py-name">new_cookies</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">        <tt id="link-84" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-84', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-85', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.kill_cookie()=esapi.http_utilities.HTTPUtilities-class.html#kill_cookie,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.kill_cookie()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#kill_cookie"><a title="esapi.http_utilities.HTTPUtilities.kill_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.kill_cookie" class="py-name" href="#" onclick="return doclink('link-86', 'kill_cookie', 'link-86');">kill_cookie</a></tt><tt class="py-op">(</tt> <tt class="py-string">"test1"</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt> <tt class="py-op">)</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_send_safe_redirect"></a><div id="HTTPUtilitiesTest.test_send_safe_redirect-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_send_safe_redirect-toggle" onclick="return toggle('HTTPUtilitiesTest.test_send_safe_redirect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_send_safe_redirect">test_send_safe_redirect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_send_safe_redirect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_send_safe_redirect-expanded"><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-keyword">pass</tt> </tt>
</div><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_add_cookie"></a><div id="HTTPUtilitiesTest.test_add_cookie-def"><a name="L153"></a><tt class="py-lineno">153</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_add_cookie-toggle" onclick="return toggle('HTTPUtilitiesTest.test_add_cookie');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_add_cookie">test_add_cookie</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_add_cookie-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_add_cookie-expanded"><a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-87', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-88', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-89', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-90', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-91', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">         </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-comment"># add_cookie(key, value='', max_age=None, path='/', domain=None,</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-comment"># secure=None, httponly=False, version=None, comment=None, expires=None)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.add_cookie()=esapi.http_utilities.HTTPUtilities-class.html#add_cookie,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_cookie()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#add_cookie"><a title="esapi.http_utilities.HTTPUtilities.add_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_cookie" class="py-name" href="#" onclick="return doclink('link-92', 'add_cookie', 'link-92');">add_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-string">'test1'</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-string">'test1'</tt><tt class="py-op">)</tt> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">         </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.add_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_cookie" class="py-name" href="#" onclick="return doclink('link-93', 'add_cookie', 'link-92');">add_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-string">'test2'</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-string">'test2'</tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">         </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-comment"># illegal name</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.add_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_cookie" class="py-name" href="#" onclick="return doclink('link-94', 'add_cookie', 'link-92');">add_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-string">'tes&lt;t3'</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-string">'test3'</tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">         </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">        <tt class="py-comment"># illegal value</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.add_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.add_cookie" class="py-name" href="#" onclick="return doclink('link-95', 'add_cookie', 'link-92');">add_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">=</tt><tt class="py-string">'test3'</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-string">'tes&lt;t3'</tt><tt class="py-op">)</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">cookies</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_state_from_encrypted_cookie"></a><div id="HTTPUtilitiesTest.test_state_from_encrypted_cookie-def"><a name="L177"></a><tt class="py-lineno">177</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_state_from_encrypted_cookie-toggle" onclick="return toggle('HTTPUtilitiesTest.test_state_from_encrypted_cookie');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_state_from_encrypted_cookie">test_state_from_encrypted_cookie</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_state_from_encrypted_cookie-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_state_from_encrypted_cookie-expanded"><a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-96" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-96', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-97" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-97', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">         </tt>
<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">        <tt class="py-name">empty</tt> <tt class="py-op">=</tt> <tt id="link-98" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-98', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-99', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.decrypt_state_from_cookie()=esapi.http_utilities.HTTPUtilities-class.html#decrypt_state_from_cookie,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.decrypt_state_from_cookie()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#decrypt_state_from_cookie"><a title="esapi.http_utilities.HTTPUtilities.decrypt_state_from_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.decrypt_state_from_cookie" class="py-name" href="#" onclick="return doclink('link-100', 'decrypt_state_from_cookie', 'link-100');">decrypt_state_from_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">empty</tt><tt class="py-op">)</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">         </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">        <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'one'</tt> <tt class="py-op">:</tt> <tt class="py-string">'aspect'</tt><tt class="py-op">,</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">             <tt class="py-string">'two'</tt> <tt class="py-op">:</tt> <tt class="py-string">'ridiculous'</tt><tt class="py-op">,</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">             <tt class="py-string">'test_hard'</tt> <tt class="py-op">:</tt> <tt class="py-string">"&amp;(@#*!^|;,."</tt> <tt class="py-op">}</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">              </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt id="link-101" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-101', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-102', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.encrypt_state_in_cookie()=esapi.http_utilities.HTTPUtilities-class.html#encrypt_state_in_cookie,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.encrypt_state_in_cookie()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#encrypt_state_in_cookie"><a title="esapi.http_utilities.HTTPUtilities.encrypt_state_in_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.encrypt_state_in_cookie" class="py-name" href="#" onclick="return doclink('link-103', 'encrypt_state_in_cookie', 'link-103');">encrypt_state_in_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">m</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'Set-Cookie'</tt><tt class="py-op">]</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-name">encrypted</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">[</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">';'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt id="link-104" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-104', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-105" class="py-name" targets="Class Method esapi.core.ESAPI.encryptor()=esapi.core.ESAPI-class.html#encryptor,Module esapi.encryptor=esapi.encryptor-module.html"><a title="esapi.core.ESAPI.encryptor
esapi.encryptor" class="py-name" href="#" onclick="return doclink('link-105', 'encryptor', 'link-105');">encryptor</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name" targets="Method esapi.encryptor.Encryptor.decrypt()=esapi.encryptor.Encryptor-class.html#decrypt,Method esapi.reference.default_encryptor.DefaultEncryptor.decrypt()=esapi.reference.default_encryptor.DefaultEncryptor-class.html#decrypt"><a title="esapi.encryptor.Encryptor.decrypt
esapi.reference.default_encryptor.DefaultEncryptor.decrypt" class="py-name" href="#" onclick="return doclink('link-106', 'decrypt', 'link-106');">decrypt</a></tt><tt class="py-op">(</tt><tt class="py-name">encrypted</tt><tt class="py-op">)</tt> </tt>
</div><a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">             </tt>
<a name="HTTPUtilitiesTest.test_save_too_long_state_in_cookie"></a><div id="HTTPUtilitiesTest.test_save_too_long_state_in_cookie-def"><a name="L193"></a><tt class="py-lineno">193</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_save_too_long_state_in_cookie-toggle" onclick="return toggle('HTTPUtilitiesTest.test_save_too_long_state_in_cookie');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_save_too_long_state_in_cookie">test_save_too_long_state_in_cookie</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_save_too_long_state_in_cookie-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_save_too_long_state_in_cookie-expanded"><a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-107" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-107', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-108" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-108', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt id="link-109" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-109', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-110', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-111', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">         </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">        <tt class="py-name">foo</tt> <tt class="py-op">=</tt> <tt class="py-string">"abcd"</tt> <tt class="py-op">*</tt> <tt class="py-number">1000</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">         </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">        <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'long'</tt><tt class="py-op">:</tt> <tt class="py-name">foo</tt><tt class="py-op">}</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">            <tt id="link-112" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-112', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-113', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.encrypt_state_in_cookie
esapi.reference.default_http_utilities.DefaultHTTPUtilities.encrypt_state_in_cookie" class="py-name" href="#" onclick="return doclink('link-114', 'encrypt_state_in_cookie', 'link-103');">encrypt_state_in_cookie</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fail</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
</div><a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">             </tt>
<a name="HTTPUtilitiesTest.test_set_no_cache_headers"></a><div id="HTTPUtilitiesTest.test_set_no_cache_headers-def"><a name="L207"></a><tt class="py-lineno">207</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_set_no_cache_headers-toggle" onclick="return toggle('HTTPUtilitiesTest.test_set_no_cache_headers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_set_no_cache_headers">test_set_no_cache_headers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_set_no_cache_headers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_set_no_cache_headers-expanded"><a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-115" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-115', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-116" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-116', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt id="link-117" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-117', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-118', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="esapi.http_utilities.HTTPUtilities.set_current_http
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_current_http" class="py-name" href="#" onclick="return doclink('link-119', 'set_current_http', 'link-62');">set_current_http</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">         </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">"test1"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"1"</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">"test2"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"2"</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">"test3"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">"3"</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">         </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">        <tt id="link-120" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-120', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-121', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.set_no_cache_headers()=esapi.http_utilities.HTTPUtilities-class.html#set_no_cache_headers,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_no_cache_headers()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#set_no_cache_headers"><a title="esapi.http_utilities.HTTPUtilities.set_no_cache_headers
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_no_cache_headers" class="py-name" href="#" onclick="return doclink('link-122', 'set_no_cache_headers', 'link-122');">set_no_cache_headers</a></tt><tt class="py-op">(</tt> <tt class="py-name">response</tt> <tt class="py-op">)</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'Cache-Control'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertTrue</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'Expires'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_set_remember_token"></a><div id="HTTPUtilitiesTest.test_set_remember_token-def"><a name="L222"></a><tt class="py-lineno">222</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_set_remember_token-toggle" onclick="return toggle('HTTPUtilitiesTest.test_set_remember_token');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_set_remember_token">test_set_remember_token</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_set_remember_token-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_set_remember_token-expanded"><a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-123" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-123', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="esapi.authenticator
esapi.core.ESAPI.authenticator" class="py-name" href="#" onclick="return doclink('link-124', 'authenticator', 'link-26');">authenticator</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">         </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt id="link-125" class="py-name" targets="Variable esapi.reference.default_user.DefaultUser.account_name=esapi.reference.default_user.DefaultUser-class.html#account_name,Variable esapi.user.AnonymousUser.account_name=esapi.user.AnonymousUser-class.html#account_name,Variable esapi.user.User.account_name=esapi.user.User-class.html#account_name"><a title="esapi.reference.default_user.DefaultUser.account_name
esapi.user.AnonymousUser.account_name
esapi.user.User.account_name" class="py-name" href="#" onclick="return doclink('link-125', 'account_name', 'link-125');">account_name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"joestheplumber"</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt class="py-name">password</tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-126" class="py-name" targets="Method esapi.authenticator.Authenticator.generate_strong_password()=esapi.authenticator.Authenticator-class.html#generate_strong_password,Method esapi.reference.shelve_authenticator.ShelveAuthenticator.generate_strong_password()=esapi.reference.shelve_authenticator.ShelveAuthenticator-class.html#generate_strong_password"><a title="esapi.authenticator.Authenticator.generate_strong_password
esapi.reference.shelve_authenticator.ShelveAuthenticator.generate_strong_password" class="py-name" href="#" onclick="return doclink('link-126', 'generate_strong_password', 'link-126');">generate_strong_password</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt id="link-127" class="py-name"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-127', 'user', 'link-28');">user</a></tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="esapi.authenticator.Authenticator.create_user
esapi.reference.shelve_authenticator.ShelveAuthenticator.create_user" class="py-name" href="#" onclick="return doclink('link-128', 'create_user', 'link-31');">create_user</a></tt><tt class="py-op">(</tt><tt id="link-129" class="py-name"><a title="esapi.reference.default_user.DefaultUser.account_name
esapi.user.AnonymousUser.account_name
esapi.user.User.account_name" class="py-name" href="#" onclick="return doclink('link-129', 'account_name', 'link-125');">account_name</a></tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">,</tt> <tt class="py-name">password</tt><tt class="py-op">)</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">        <tt id="link-130" class="py-name"><a title="esapi.core.ESAPI.user
esapi.user" class="py-name" href="#" onclick="return doclink('link-130', 'user', 'link-28');">user</a></tt><tt class="py-op">.</tt><tt id="link-131" class="py-name" targets="Method esapi.reference.default_user.DefaultUser.enable()=esapi.reference.default_user.DefaultUser-class.html#enable,Method esapi.user.AnonymousUser.enable()=esapi.user.AnonymousUser-class.html#enable,Method esapi.user.User.enable()=esapi.user.User-class.html#enable"><a title="esapi.reference.default_user.DefaultUser.enable
esapi.user.AnonymousUser.enable
esapi.user.User.enable" class="py-name" href="#" onclick="return doclink('link-131', 'enable', 'link-131');">enable</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">        <tt class="py-name">request</tt> <tt class="py-op">=</tt> <tt id="link-132" class="py-name"><a title="esapi.test.http.mock_http_request.MockHttpRequest" class="py-name" href="#" onclick="return doclink('link-132', 'MockHttpRequest', 'link-13');">MockHttpRequest</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">POST</tt><tt class="py-op">[</tt><tt class="py-string">'username'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-133" class="py-name"><a title="esapi.reference.default_user.DefaultUser.account_name
esapi.user.AnonymousUser.account_name
esapi.user.User.account_name" class="py-name" href="#" onclick="return doclink('link-133', 'account_name', 'link-125');">account_name</a></tt> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">        <tt class="py-name">request</tt><tt class="py-op">.</tt><tt class="py-name">POST</tt><tt class="py-op">[</tt><tt class="py-string">'password'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">password</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt id="link-134" class="py-name"><a title="esapi.test.http.mock_http_response.MockHttpResponse" class="py-name" href="#" onclick="return doclink('link-134', 'MockHttpResponse', 'link-18');">MockHttpResponse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-135" class="py-name" targets="Method esapi.authenticator.Authenticator.login()=esapi.authenticator.Authenticator-class.html#login,Method esapi.reference.shelve_authenticator.ShelveAuthenticator.login()=esapi.reference.shelve_authenticator.ShelveAuthenticator-class.html#login"><a title="esapi.authenticator.Authenticator.login
esapi.reference.shelve_authenticator.ShelveAuthenticator.login" class="py-name" href="#" onclick="return doclink('link-135', 'login', 'link-135');">login</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">         </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">        <tt class="py-name">max_age</tt> <tt class="py-op">=</tt> <tt class="py-number">60</tt> <tt class="py-op">*</tt> <tt class="py-number">60</tt> <tt class="py-op">*</tt> <tt class="py-number">24</tt> <tt class="py-op">*</tt> <tt class="py-number">14</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt id="link-136" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-136', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-137', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name" targets="Method esapi.http_utilities.HTTPUtilities.set_remember_token()=esapi.http_utilities.HTTPUtilities-class.html#set_remember_token,Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_remember_token()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#set_remember_token"><a title="esapi.http_utilities.HTTPUtilities.set_remember_token
esapi.reference.default_http_utilities.DefaultHTTPUtilities.set_remember_token" class="py-name" href="#" onclick="return doclink('link-138', 'set_remember_token', 'link-138');">set_remember_token</a></tt><tt class="py-op">(</tt> <tt class="py-name">password</tt><tt class="py-op">,</tt> <tt class="py-name">max_age</tt><tt class="py-op">,</tt> <tt class="py-string">"domain"</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-name">request</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt> <tt class="py-op">)</tt> </tt>
</div><a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">         </tt>
<a name="HTTPUtilitiesTest.test_query_to_dict"></a><div id="HTTPUtilitiesTest.test_query_to_dict-def"><a name="L238"></a><tt class="py-lineno">238</tt> <a class="py-toggle" href="#" id="HTTPUtilitiesTest.test_query_to_dict-toggle" onclick="return toggle('HTTPUtilitiesTest.test_query_to_dict');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="esapi.test.test_http_utilities.HTTPUtilitiesTest-class.html#test_query_to_dict">test_query_to_dict</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="HTTPUtilitiesTest.test_query_to_dict-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="HTTPUtilitiesTest.test_query_to_dict-expanded"><a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-139" class="py-name"><a title="esapi.core.ESAPI" class="py-name" href="#" onclick="return doclink('link-139', 'ESAPI', 'link-5');">ESAPI</a></tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="esapi.core.ESAPI.http_utilities
esapi.http_utilities" class="py-name" href="#" onclick="return doclink('link-140', 'http_utilities', 'link-7');">http_utilities</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line">         </tt>
<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line">        <tt class="py-name">query</tt> <tt class="py-op">=</tt> <tt class="py-string">'?a=1&amp;b=2&amp;c=3'</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-name">testing</tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name" targets="Method esapi.reference.default_http_utilities.DefaultHTTPUtilities.query_to_dict()=esapi.reference.default_http_utilities.DefaultHTTPUtilities-class.html#query_to_dict"><a title="esapi.reference.default_http_utilities.DefaultHTTPUtilities.query_to_dict" class="py-name" href="#" onclick="return doclink('link-141', 'query_to_dict', 'link-141');">query_to_dict</a></tt><tt class="py-op">(</tt><tt class="py-name">query</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-name">correct</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'a'</tt> <tt class="py-op">:</tt> <tt class="py-string">'1'</tt><tt class="py-op">,</tt> <tt class="py-string">'b'</tt> <tt class="py-op">:</tt> <tt class="py-string">'2'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt> <tt class="py-op">:</tt> <tt class="py-string">'3'</tt><tt class="py-op">}</tt> </tt>
<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">assertEquals</tt><tt class="py-op">(</tt><tt class="py-name">testing</tt><tt class="py-op">,</tt> <tt class="py-name">correct</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">         </tt>
<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">"__main__"</tt><tt class="py-op">:</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line">    <tt class="py-name">unittest</tt><tt class="py-op">.</tt><tt class="py-name">main</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="esapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Nov  8 16:04:24 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
